#pragma once
#include <gfx/dx12/dx_common.h>

namespace primal
{
	namespace gfx
	{
		class RenderTarget : public ComPtr<ID3D12Resource>
		{
		public:
			RenderTarget();
			RenderTarget(u32 width, u32 height);
			~RenderTarget();
			void resize(u32 width, u32 height);
			D3D12_GPU_DESCRIPTOR_HANDLE get_id();
			void begin(ID3D12GraphicsCommandListN* list);
			void end(ID3D12GraphicsCommandListN* list);
		private:
			descriptor_handle shader_view;
			descriptor_handle render_view;
			D3D12_VIEWPORT view_port;
			D3D12_RECT scissor;
			D3D12_CLEAR_VALUE clear_value;
		};
	}
}